package com.jzhao.jpre.model;

import org.springframework.dao.DataAccessException;

import com.jzhao.jpre.base.Assembler;
import com.jzhao.jpre.base.StringPublicDeal;
import com.jzhao.jpre.model.dao.SubCodeDao;

public class TestSubCode {
	public static void main(String[] args){
		SubCodeDao subCodeDao=(SubCodeDao)Assembler.getInstance("subCodeDao");
		StringPublicDeal cc=(StringPublicDeal)Assembler.getInstance("stringPublicDeal");
		SubCode subCode=new SubCode();
		
		try{
			subCode=subCodeDao.selectByKey("1234","2333");
			System.out.println("MrchCode = " + subCode.getMrchCode());
			System.out.println("SubCode = " + subCode.getSubCode());
			System.out.println("TranName = " + subCode.getTranName());
			System.out.println("TranAtt = " + subCode.getTranAtt());
			System.out.println("TranChar = " + subCode.getTranchar());
			System.out.println("TranExplain = " + cc.convToGB2312(subCode.getTranExplain()));
		}catch(DataAccessException dae){
			System.out.println("The record doesn't exist!");
		}
	}
}
